package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class ConfirmDialogRenderer implements Sequenceable, Serializable {
    @SerializedName("trackingParams")
    private String trackingParams;

    @SerializedName("cancelButton")
    private CancelButton cancelButton;

    @SerializedName("confirmButton")
    private ConfirmButton confirmButton;

    @SerializedName("dialogMessages")
    private List<DialogMessagesItem> dialogMessages;

    @SerializedName("primaryIsCancel")
    private boolean isPrimaryIsCancel=false;



    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.trackingParams);
        parcel.writeSequenceable(this.cancelButton);
        parcel.writeSequenceable(this.confirmButton);
        parcel.writeList(this.dialogMessages);
        parcel.writeBoolean(this.isPrimaryIsCancel);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.trackingParams=parcel.readString();
        parcel.readSequenceable(this.cancelButton);
        parcel.readSequenceable(this.confirmButton);
        this.dialogMessages=parcel.readSequenceableList(DialogMessagesItem.class);
        this.isPrimaryIsCancel=parcel.readBoolean();
        return true;
    }

    @Override
    public String toString() {
        return "ConfirmDialogRenderer{" +
                "trackingParams = '" + trackingParams + '\'' +
                ",cancelButton = '" + cancelButton + '\'' +
                ",confirmButton = '" + confirmButton + '\'' +
                ",dialogMessages = '" + dialogMessages + '\'' +
                ",primaryIsCancel = '" + isPrimaryIsCancel + '\'' +
                "}";
    }

    public String getTrackingParams() {
        return trackingParams;
    }

    public void setTrackingParams(String trackingParams) {
        this.trackingParams = trackingParams;
    }

    public CancelButton getCancelButton() {
        return cancelButton;
    }

    public void setCancelButton(CancelButton cancelButton) {
        this.cancelButton = cancelButton;
    }

    public ConfirmButton getConfirmButton() {
        return confirmButton;
    }

    public void setConfirmButton(ConfirmButton confirmButton) {
        this.confirmButton = confirmButton;
    }

    public List<DialogMessagesItem> getDialogMessages() {
        return dialogMessages;
    }

    public void setDialogMessages(List<DialogMessagesItem> dialogMessages) {
        this.dialogMessages = dialogMessages;
    }

    public boolean isPrimaryIsCancel() {
        return isPrimaryIsCancel;
    }

    public void setPrimaryIsCancel(boolean primaryIsCancel) {
        isPrimaryIsCancel = primaryIsCancel;
    }
}
